<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>base component</title>
</head>

<body>
    <div id="app">
        <li v-for="name in students" :key="name">
            {{ name }}
        </li>
    </div>
    <script src="../assets/vue2.js"></script>
    <script>
        // 组件定义后再实例化，如果在前面实例化，页面会不正常
        const app = new Vue({
            el: '#app',
            data() {
                return {
                    students: ["张三", "李四", "王二"]
                }
            }
        });
    </script>
</body>

</html>